package com.jollychic.utils;

import java.util.Map;

import org.yaml.snakeyaml.Yaml;

import com.jollychic.db.DBConfig;

public class YamlUtils {

	/**
	 * 返回解析结果
	 * @param conf
	 * @return
	 */
	public static <T extends DBConfig> DBConfig interpretYaml(DBConfig conf) {
		// 解析参数
		return conf.interpretYaml(new Yaml()
				.loadAs(YamlUtils.class.getClassLoader()
						.getResourceAsStream("data.yml"),Map.class));
	}

}
